package com.ruoyi.eims.purchase.service.impl;

import java.util.List;

import com.ruoyi.eims.purchase.domain.PurchaseOrderDetails;
import com.ruoyi.eims.purchase.mapper.PurchaseOrderDetailsMapper;
import com.ruoyi.eims.purchase.service.IPurchaseOrderDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 采购订单明细Service业务层处理
 * 
 * @author hp
 * @date 2023-02-04
 */
@Service
public class PurchaseOrderDetailsServiceImpl implements IPurchaseOrderDetailsService
{
    @Autowired
    private PurchaseOrderDetailsMapper purchaseOrderDetailsMapper;

    /**
     * 查询采购订单明细
     * 
     * @param id 采购订单明细主键
     * @return 采购订单明细
     */
    @Override
    public PurchaseOrderDetails selectPurchaseOrderDetailsById(Long id)
    {
        return purchaseOrderDetailsMapper.selectPurchaseOrderDetailsById(id);
    }

    /**
     * 查询采购订单明细列表
     * 
     * @param purchaseOrderDetails 采购订单明细
     * @return 采购订单明细
     */
    @Override
    public List<PurchaseOrderDetails> selectPurchaseOrderDetailsList(PurchaseOrderDetails purchaseOrderDetails)
    {
        return purchaseOrderDetailsMapper.selectPurchaseOrderDetailsList(purchaseOrderDetails);
    }

    /**
     * 新增采购订单明细
     * 
     * @param purchaseOrderDetails 采购订单明细
     * @return 结果
     */
    @Override
    public int insertPurchaseOrderDetails(PurchaseOrderDetails purchaseOrderDetails)
    {
        return purchaseOrderDetailsMapper.insertPurchaseOrderDetails(purchaseOrderDetails);
    }

    /**
     * 修改采购订单明细
     * 
     * @param purchaseOrderDetails 采购订单明细
     * @return 结果
     */
    @Override
    public int updatePurchaseOrderDetails(PurchaseOrderDetails purchaseOrderDetails)
    {
        return purchaseOrderDetailsMapper.updatePurchaseOrderDetails(purchaseOrderDetails);
    }

    /**
     * 批量删除采购订单明细
     * 
     * @param ids 需要删除的采购订单明细主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderDetailsByIds(Long[] ids)
    {
        return purchaseOrderDetailsMapper.deletePurchaseOrderDetailsByIds(ids);
    }

    /**
     * 删除采购订单明细信息
     * 
     * @param id 采购订单明细主键
     * @return 结果
     */
    @Override
    public int deletePurchaseOrderDetailsById(Long id)
    {
        return purchaseOrderDetailsMapper.deletePurchaseOrderDetailsById(id);
    }
}
